package net.alan.modules.interceptor;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Author 李岩飞
 * Email eliyanfei@126.com
 * 2017/11/21
 */
@Component
public class UserSecurityInterceptor implements HandlerInterceptor {

    @Override
    public void afterCompletion(HttpServletRequest req,
                                HttpServletResponse resp, Object obj, Exception ex)
            throws Exception {

    }

    @Override
    public void postHandle(HttpServletRequest req, HttpServletResponse resp,
                           Object obj, ModelAndView mav) throws Exception {
        System.out.println("---------------------拦截器处理----------------------");

    }

    @Override
    public boolean preHandle(HttpServletRequest req, HttpServletResponse resp,
                             Object obj) throws Exception {
        return false;
    }

}
